<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>dsitxss: xdsitxss_video_test_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dsitxss
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xdsitxss__video__test__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xdsitxss_video_test_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the <a class="el" href="struct_x_dsi_tx_ss.html" title="The XDsiTxSs driver instance data. ">XDsiTxSs</a> driver. </p>
<p>It performs a video test on the MIPI DSI Tx Subsystem. It tests DSI TX functionality with following sequence. Presently the application is supporting only RGB888 format. 3 bytes per pixel BRAM &ndash; (MM2S)&ndash;VDMA (MM2S)&ndash;DSI TX&ndash; CSI RX &ndash; (S2MM)VDMA(S2MM)&ndash;BRAM This function will read input from BRAM0, provide BRAM input to VDMA MM2S, VDMA feeds MM2S input to DSI TX controller, the output of DSI will be connected to CSI RX controller. The output of CSI given to S2MM of VDMA. VDMA writes S2MM data on BRAM1. Finally compare BRAM0 and BRAM1 data User has to provide all necessary inputs as per desired resolution</p>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver Who Date    Changes
<hr/>

1.0 ram 11/2/16 Initial Release for MIPI DSI TX subsystem
1.1 ms  01/23/17 Modified xil_printf statement in main function to
                 ensure that "Successfully ran" and "Failed" strings
                 are available in all examples. This is a fix for
                 CR-965028.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a17e686b9a365a72175c35bd7be2566ac"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#a17e686b9a365a72175c35bd7be2566ac">DsiTxSs_VideoTestExample</a> (u32 DeviceId)</td></tr>
<tr class="memdesc:a17e686b9a365a72175c35bd7be2566ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main entry point for the video test example using the <a class="el" href="struct_x_dsi_tx_ss.html" title="The XDsiTxSs driver instance data. ">XDsiTxSs</a> driver.  <a href="#a17e686b9a365a72175c35bd7be2566ac">More...</a><br /></td></tr>
<tr class="separator:a17e686b9a365a72175c35bd7be2566ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a329a2ed6a3ef5eae3c44593d358921b4"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#a329a2ed6a3ef5eae3c44593d358921b4">WaitForCompletion</a> (s32 VdmaChannel, u32 *VdmaBaseAddr)</td></tr>
<tr class="memdesc:a329a2ed6a3ef5eae3c44593d358921b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function wait until the DMA channel halts.  <a href="#a329a2ed6a3ef5eae3c44593d358921b4">More...</a><br /></td></tr>
<tr class="separator:a329a2ed6a3ef5eae3c44593d358921b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb12280dc0e5dc20089aa30fee2b9ade"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#adb12280dc0e5dc20089aa30fee2b9ade">ResetVDMA</a> ()</td></tr>
<tr class="memdesc:adb12280dc0e5dc20089aa30fee2b9ade"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function ResetVDMA.  <a href="#adb12280dc0e5dc20089aa30fee2b9ade">More...</a><br /></td></tr>
<tr class="separator:adb12280dc0e5dc20089aa30fee2b9ade"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0471a60847aedd60f68e4fb148ebcfd8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#a0471a60847aedd60f68e4fb148ebcfd8">ConfigureChannel</a> (u32 VdmaChannel)</td></tr>
<tr class="memdesc:a0471a60847aedd60f68e4fb148ebcfd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function to setup Horizontal size and stride.  <a href="#a0471a60847aedd60f68e4fb148ebcfd8">More...</a><br /></td></tr>
<tr class="separator:a0471a60847aedd60f68e4fb148ebcfd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68278c15fc45af165d99d0ed34c3e8f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#a68278c15fc45af165d99d0ed34c3e8f2">SetupVdmaCR</a> (s32 VdmaChannel, s32 FrameCount)</td></tr>
<tr class="memdesc:a68278c15fc45af165d99d0ed34c3e8f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function to setup the VDMA Control Register.  <a href="#a68278c15fc45af165d99d0ed34c3e8f2">More...</a><br /></td></tr>
<tr class="separator:a68278c15fc45af165d99d0ed34c3e8f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae46dffb43c982977e224dd2da04946bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#ae46dffb43c982977e224dd2da04946bc">StartChannel</a> (s32 VdmaChannel, s32 VerticalSize)</td></tr>
<tr class="memdesc:ae46dffb43c982977e224dd2da04946bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function to start mm2s or s2mm VdmaChannel - write the vertical size.  <a href="#ae46dffb43c982977e224dd2da04946bc">More...</a><br /></td></tr>
<tr class="separator:ae46dffb43c982977e224dd2da04946bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93bbc4432d6da3cbcf5873a9f9be24fd"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdsitxss__video__test__example_8c.html#a93bbc4432d6da3cbcf5873a9f9be24fd">main</a> ()</td></tr>
<tr class="memdesc:a93bbc4432d6da3cbcf5873a9f9be24fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for <a class="el" href="struct_x_dsi_tx_ss.html" title="The XDsiTxSs driver instance data. ">XDsiTxSs</a> self test example.  <a href="#a93bbc4432d6da3cbcf5873a9f9be24fd">More...</a><br /></td></tr>
<tr class="separator:a93bbc4432d6da3cbcf5873a9f9be24fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0471a60847aedd60f68e4fb148ebcfd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0471a60847aedd60f68e4fb148ebcfd8">&#9670;&nbsp;</a></span>ConfigureChannel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ConfigureChannel </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>VdmaChannel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function to setup Horizontal size and stride. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VdmaChannel</td><td>specifes VdmaChannel is MM2S or S2MM</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="a17e686b9a365a72175c35bd7be2566ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17e686b9a365a72175c35bd7be2566ac">&#9670;&nbsp;</a></span>DsiTxSs_VideoTestExample()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 DsiTxSs_VideoTestExample </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main entry point for the video test example using the <a class="el" href="struct_x_dsi_tx_ss.html" title="The XDsiTxSs driver instance data. ">XDsiTxSs</a> driver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the unique device ID of the MIPI DSI RX Subsystem core.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE if any of MIPI DSI RX Subsystem sub-core self test failed.</li>
<li>XST_SUCCESS, if all of MIPI DSI RX Subsystem sub-core self test passed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="struct_x_dsi_tx_ss___config.html#a7d585195086fad6ffb7623bbf1881d43">XDsiTxSs_Config::BaseAddr</a>, <a class="el" href="group__dsitxss__v1__0.html#gaa4193394015188a834eeeee8e5da3e40">XDsiTxSs_CfgInitialize()</a>, <a class="el" href="group__dsitxss__v1__0.html#ga9385832ac1a54eafe16fd05bd5ca2806">XDsiTxSs_LookupConfig()</a>, and <a class="el" href="group__dsitxss__v1__0.html#ga5c2a0c949b32000d56edf503bcee3b48">XDsiTxSs_SelfTest()</a>.</p>

<p class="reference">Referenced by <a class="el" href="xdsitxss__video__test__example_8c.html#a93bbc4432d6da3cbcf5873a9f9be24fd">main()</a>.</p>

</div>
</div>
<a id="a93bbc4432d6da3cbcf5873a9f9be24fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93bbc4432d6da3cbcf5873a9f9be24fd">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 main </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for <a class="el" href="struct_x_dsi_tx_ss.html" title="The XDsiTxSs driver instance data. ">XDsiTxSs</a> self test example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the self test example passed.</li>
<li>XST_FAILURE if the self test example was unsuccessful.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="xdsitxss__video__test__example_8c.html#a17e686b9a365a72175c35bd7be2566ac">DsiTxSs_VideoTestExample()</a>.</p>

</div>
</div>
<a id="adb12280dc0e5dc20089aa30fee2b9ade"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb12280dc0e5dc20089aa30fee2b9ade">&#9670;&nbsp;</a></span>ResetVDMA()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ResetVDMA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function ResetVDMA. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="a68278c15fc45af165d99d0ed34c3e8f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68278c15fc45af165d99d0ed34c3e8f2">&#9670;&nbsp;</a></span>SetupVdmaCR()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetupVdmaCR </td>
          <td>(</td>
          <td class="paramtype">s32&#160;</td>
          <td class="paramname"><em>VdmaChannel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s32&#160;</td>
          <td class="paramname"><em>FrameCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function to setup the VDMA Control Register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VdmaChannel</td><td>specifes VdmaChannel is MM2S or S2MM </td></tr>
    <tr><td class="paramname">FrameCount</td><td>specifies number of frames to transfer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="ae46dffb43c982977e224dd2da04946bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae46dffb43c982977e224dd2da04946bc">&#9670;&nbsp;</a></span>StartChannel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void StartChannel </td>
          <td>(</td>
          <td class="paramtype">s32&#160;</td>
          <td class="paramname"><em>VdmaChannel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s32&#160;</td>
          <td class="paramname"><em>VerticalSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function to start mm2s or s2mm VdmaChannel - write the vertical size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VdmaChannel</td><td>specifes VdmaChannel is MM2S or S2MM </td></tr>
    <tr><td class="paramname">VerticalSize</td><td>specifes No of lines</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="a329a2ed6a3ef5eae3c44593d358921b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a329a2ed6a3ef5eae3c44593d358921b4">&#9670;&nbsp;</a></span>WaitForCompletion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 WaitForCompletion </td>
          <td>(</td>
          <td class="paramtype">s32&#160;</td>
          <td class="paramname"><em>VdmaChannel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>VdmaBaseAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function wait until the DMA channel halts. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VdmaChannel</td><td>specifes VdmaChannel is MM2S or S2MM .</td></tr>
    <tr><td class="paramname">VdmaBaseAddr</td><td>VDMA base address</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MM2S_HALT_SUCCESS, S2MM_HALT_SUCCESS in success MM2S_HALT_FAILURE, S2MM_HALT_FAILURE on failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
